# 计算器当然用户输入不是加减乘除,会抛出异常,并捕捉这个异常
try:
    a = int(input("请输入数字:"))
    b = int(input("请输入数字:"))
    op1 = input("请输入+-*/")
    if op1 != "+" and op1 != "-" and op1 != "*" and op1 != "/":
        raise Exception("请输入正确的+-*/")
    if op1 == "+":
        print(a + b)
    elif op1 == "-":
        print(a - b)
    elif op1 == "*":
        print(a * b)
    else: 
        print(a / b)

except Exception as result:
    print(result)
